/*
 *
1234  56.78 hello
100, 1.24, world

 */

#include <iostream>
#include <cstdio>
#include <sstream>
using namespace std;
int main(void){
	int i = 1234;
	double d = 56.78;
	char s[] = "hello";
#if 0
	char buf[100] = {0};
	sprintf(buf, "%d %lf %s", i, d, s);
	printf("%s\n", buf);
	char str[] = "100 1.23 world";
	sscanf(str, "%d %lf %s", &i, &d, s);
	printf("%d %lf %s\n", i, d, s);
#endif
	ostringstream oss;
	oss << i << ' ' << ' ' << d << ' ' << s;
	cout << oss.str() << endl;

	istringstream iss;
	iss.str("100 1.24 world");
	iss >> i >> d >> s;
	cout << i << ", " << d << ", " << s << endl;
	return 0;
}
